<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/

//必须要登录的api路由
Route::group(['namespace' => 'Api','prefix'=>'api', 'middleware' => ['api.auth']], function() {

    //管理员数据
    Route::get('systems', 'SystemController@page');//列表
    Route::get('system/{id}', 'SystemController@show')->where('id','[1-9][0-9]*');//详情
    Route::post('system', 'SystemController@store');//新增
    Route::put('system/{id}', 'SystemController@update')->where('id','[1-9][0-9]*');//修改
    Route::put('system/{id}/state/{state}', 'SystemController@state')->where('id','[1-9]\d{0,19}(,[1-9]\d{0,19})*')->where('state','[01]');//修改某个账号的状态[删除或者恢复正常]


});

